[package]
name = "qdrant"
version = "1.6.1"
authors = [
    "Andrey Vasnetsov <andrey@vasnetsov.com>",
    "Qdrant Team <info@qdrant.tech>",
]
readme = "README.md"
homepage = "https://qdrant.tech/"
repository = "https://github.com/qdrant/qdrant"
license = "Apache-2.0"
edition = "2021"
default-run = "qdrant"

[features]
default = ["web", "parking_lot"]
web = ["actix-web"]
multiling-chinese = ["segment/multiling-chinese"]
multiling-japanese = ["segment/multiling-japanese"]
multiling-korean = ["segment/multiling-korean"]
service_debug = ["parking_lot", "parking_lot/deadlock_detection"]
tracing = [
    "api/tracing",
    "collection/tracing",
    "segment/tracing",
    "storage/tracing",
]
console = ["console-subscriber"]
console-subscriber = ["tracing", "dep:console-subscriber"]
tracy = ["tracing-tracy"]
tracing-tracy = ["tracing", "dep:tracing-tracy"]
tokio-tracing = ["tokio/tracing"]
stacktrace = ["rstack-self"]

[dev-dependencies]
serde_urlencoded = "0.7"
sealed_test = "1.0.0"

tempfile = "3.8.0"
rusty-hook = "^0.11.2"


[dependencies]

parking_lot = { version = "0.12.1", features = ["deadlock_detection"], optional = true }

num_cpus = "1.16"
thiserror = "1.0"
log = "0.4"
colored = "2"
serde = { version = "~1.0", features = ["derive"] }
serde_json = "~1.0"
chrono = { version = "~0.4", features = ["serde"] }
schemars = { version = "0.8.15", features = ["uuid1", "preserve_order", "chrono"] }
itertools = "0.11"
anyhow = "1.0.75"
futures = "0.3.28"
futures-util = "0.3.27"
clap = { version = "4.4.4", features = ["derive"] }
serde_cbor = { version = "0.11.2" }
uuid = { version = "1.4", features = ["v4", "serde"] }
sys-info = "0.9.1"
wal = { git = "https://github.com/qdrant/wal.git", rev = "a32f6a38acf7ffd761df83b0790eaefeb107cd60" }

config = "~0.13.3"

tokio = { version = "~1.32", features = ["full"] }

actix-web = { version = "4.3.1", optional = true, features = ["rustls-0_21", "actix-tls"] }
actix-cors = "0.6.4"
actix-files = "0.6.2"
tonic = { version = "0.9.2", features = ["gzip", "tls"] }
tonic-reflection = "0.9.2"
tower = "0.4.13"
tower-layer = "0.3.2"
num-traits = "0.2.16"
tar = "0.4.40"
reqwest = { version = "0.11", default-features = false, features = ["stream", "rustls-tls", "blocking"] }
rustls = "0.21.7"
rustls-pemfile = "1.0.3"
prometheus = { version = "0.13.3", default-features = false }
validator = { version = "0.16", features = ["derive"] }
actix-web-validator = "5.0.1"

# Consensus related crates
raft = { version = "0.7.0", features = ["prost-codec"], default-features = false }
slog = { version="2.7.0", features = ["max_level_trace", "release_max_level_debug"] }
slog-stdlog = "4.1.1"
prost = "0.11.9"
raft-proto = { version = "0.7.0", features = ["prost-codec"], default-features = false }

common = { path = "lib/common/common" }
memory = { path = "lib/common/memory" }
segment = { path = "lib/segment" }
collection = { path = "lib/collection" }
storage = { path = "lib/storage" }
api = { path = "lib/api" }
actix-multipart = "0.6.1"
constant_time_eq = "0.3.0"

# Profiling
tracing = { version = "0.1", features = ["async-await"] }
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
tracing-log = { version = "0.1", default-features = false, features = ["log-tracer", "std"] }
console-subscriber = { version = "0.1", default-features = false, features = ["parking_lot"], optional = true }
tracing-tracy = { version = "0.10.4", features = ["ondemand"], optional = true }

# Backtrace
[target.'cfg(target_os = "linux")'.dependencies]
rstack-self = { version = "0.3.0", optional = true }

[target.'cfg(not(target_env = "msvc"))'.dependencies]
tikv-jemallocator = "0.5"

[[bin]]
name = "schema_generator"
path = "src/schema_generator.rs"
test = false
bench = false

[[bin]]
name = "wal_inspector"
path = "src/wal_inspector.rs"
test = false
bench = false

[workspace]
members = [
    "lib/api",
    "lib/collection",
    "lib/common/*",
    "lib/segment",
    "lib/sparse",
    "lib/storage",
]
exclude = ["benches/search-points"]

[profile.release]
lto = "fat"

# Inherit from release, because we are not rebuilding often,
# and we don't want the huge binary sizes from debug builds.
[profile.ci]
inherits = "release"
lto = false
opt-level = 0

[profile.bench]
lto = false

# Profile for performance testing, which is faster to build than release.
[profile.perf]
inherits = "release"
lto = false
opt-level = 3

[patch.crates-io]
# Temporary patch until <https://github.com/hyperium/tonic/pull/1401> is merged
tonic = { git = 'https://github.com/qdrant/tonic', branch = "v0.9.2-patched" }
